screen

open fun screen(): MediaSource

Returns a media source that represents any screen's content.

Example of usage:


    MediaReceivers mediaReceivers = browser.profile().mediaCasting().mediaReceivers();
    Optional<MediaReceiver> mediaReceiver =
            mediaReceivers.list()
                          .stream()
                          .filter(it -> it.name().startsWith("Samsung TV"))
                          .findAny();
    mediaReceiver.ifPresent(samsungTv -> {
        if (samsungTv.supports(MediaSource.screen())) {
            browser.castScreen(samsungTv);
        }
    });